home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Limit on #bytes inside of struct?
- Date: 12 Feb 1996 08:02:32 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4fnh9o$9q1@solutions.solon.com>
- References: <4feg1d$d4g@cville-srv.wam.umd.edu> <4ffohq$1gb@mordred.gatech.edu> <4ffun7$1l4l@cymbal.aix.calpoly.edu> <311F15D8.78D1@zess.uni-siegen.de>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <311F15D8.78D1@zess.uni-siegen.de>,
- Markus Becker <becker@zess.uni-siegen.de> wrote:
- >No it isn't, see below.
-
- >> typedef struct {
- >> int the_array[50000];
- >> } struct_type;
-
- >This way, you don't put the 50K numbers in the struct, but only
- >a pointer to them. Should be at most 4 bytes.
-
- Please try not to post under the influence.
-
- That code would create a type "struct_type" with size (50000 * sizeof(int))
- plus any optional padding.
-
- Now,
- void foo(int x[50000]) {
- }
- takes as an argument only a pointer to an int, but this is much
- different.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
-